<div >
<h2><a id="AvoidEscapedUnicodeCharacters"></a>AvoidEscapedUnicodeCharacters</h2>
      
<div >
<h3><a id="Description"></a>Description</h3>
        
<p>
          Restrict using <a class="externalLink" href="http://docs.oracle.com/javase/specs/jls/se7/html/jls-3.html#jls-3.3">
          Unicode escapes</a> (e.g. \u221e).
          It is possible to allow using escapes for
          <a class="externalLink" href="https://en.wiktionary.org/wiki/Appendix:Control_characters"> non-printable(control) characters</a>.
          Also, this check can be configured to allow using escapes
          if trail comment is present. By the option it is possible to
          allow using escapes if literal contains only them.
        </p>
      </div>

       
<div class="section">
<h3><a id="Properties"></a>Properties</h3>
        
<table class="bodyTable">
          
<tbody><tr class="a">
            
<th>name</th>
            
<th>description</th>
            
<th>type</th>
            
<th>default value</th>
          </tr>
          
<tr class="b">
            
<td>allowEscapesForControlCharacters</td>
            
<td>Allow use escapes for non-printable(control) characters.</td>
            
<td><a href="http://checkstyle.sourceforge.net/property_types.html#boolean">Boolean</a></td>
            
<td>false</td>
          </tr>
          
<tr class="a">
            
<td>allowByTailComment</td>
            
<td>Allow use escapes if trail comment is present.</td>
            
<td><a href="http://checkstyle.sourceforge.net/property_types.html#boolean">Boolean</a></td>
            
<td>false</td>
          </tr>
          
<tr class="b">
            
<td>allowIfAllCharactersEscaped</td>
            
<td>Allow if all characters in literal are escaped.</td>
            
<td><a href="http://checkstyle.sourceforge.net/property_types.html#boolean">Boolean</a></td>
            
<td>false</td>
          </tr>
          
<tr class="a">
            
<td>allowNonPrintableEscapes</td>
            
<td>Allow non-printable escapes.</td>
            
<td><a href="http://checkstyle.sourceforge.net/property_types.html#boolean">Boolean</a></td>
            
<td>false</td>
          </tr>
        </tbody></table>
      </div>

      
<div class="section">
<h3><a id="Examples"></a>Examples</h3>
       
<p>
          Examples of using Unicode:
        </p>
        
<div class="source">
<pre>String unitAbbrev = "μs"; //Best: perfectly clear even without a comment.
String unitAbbrev = "\u03bcs"; //Poor: the reader has no idea what this is.
        </pre></div>
        
<p>
          An example of how to configure the check is:
        </p>
        
<div class="source">
<pre>&lt;module name="AvoidEscapedUnicodeCharacters"/&gt;
        </pre></div>
        
<p>
          An example of non-printable(control) characters.
        </p>
        
<div class="source">
<pre>return '\ufeff' + content; // byte order mark
        </pre></div>
        
<p>
          An example of how to configure the check to allow using escapes
          for non-printable(control) characters:
        </p>
        
<div class="source">
<pre>&lt;module name="AvoidEscapedUnicodeCharacters"&gt;
    &lt;property name="allowEscapesForControlCharacters" value="true"/&gt;
&lt;/module&gt;
        </pre></div>
        
<p>
          Example of using escapes with trail comment:
        </p>
        
<div class="source">
<pre>String unitAbbrev = "\u03bcs"; // Greek letter mu, "s"
        </pre></div>
        
<p>
          An example of how to configure the check to allow using escapes
          if trail comment is present:
        </p>
        
<div class="source">
<pre>&lt;module name="AvoidEscapedUnicodeCharacters"&gt;
    &lt;property name="allowByTailComment" value="true"/&gt;
&lt;/module&gt;
        </pre></div>
        
<p>
          Example of using escapes if literal contains only them:
        </p>
        
<div class="source">
<pre>String unitAbbrev = "\u03bc\u03bc\u03bc";
        </pre></div>
        
<p>
          An example of how to configure the check to allow escapes
          if literal contains only them:
        </p>
        
<div class="source">
<pre>&lt;module name="AvoidEscapedUnicodeCharacters"&gt;
    &lt;property name="allowIfAllCharactersEscaped" value="true"/&gt;
&lt;/module&gt;
        </pre></div>
        
<p>
          An example of how to configure the check to allow non-printable escapes:
        </p>
        
<div class="source">
<pre>&lt;module name="AvoidEscapedUnicodeCharacters"&gt;
    &lt;property name="allowNonPrintableEscapes" value="true"/&gt;
&lt;/module&gt;
        </pre></div>
      </div>

      </div>